class dome1 {
    public static void main(String[] args) {

        
           
        

        Point p=new Point();
        p.x=p.y=20;
        Point p1=p;
        p1.x=p1.y=40;

        p1.moveTo(30, 30);
        System.out.println(p.x+" "+p.y);
        System.out.println(p1.x+" "+p1.y);
        
        System.out.println(p.hashCode());
        System.out.println(p1.hashCode());

        System.out.println(p.fact1(10));
        System.out.println(p.fact2(10));
        
    } 

   

}

class Point{

    public int fact1(int n){
        int i,j,t,s;
        s=0;
        for(i=1;i<=n;i++){
            t=1;
            for(j=1;j<=i;j++){
                t=t*j;
            }
            s=s+t;
        }
        return s;
    }

    public int fact2(int n){
        int i,j,t,s;
        s=0;
        t=1;
        for(i=1;i<=n;i++){
            
                t=t*i;
            
            s=s+t;
        }
        return s;
    }

    public int x,y;
    Point(int x1,int y1){
        x=x1;
        y=y1;
    }

    Point(){
        this(0,0);
    }

    public void moveTo(int x1,int y1){
        x=x1;
        y=y1;
    }
}